#include<bits/stdc++.h>
#define rg register
#define file(x)freopen(x".in","r",stdin);freopen(x".out","w",stdout)

using namespace std;

const int maxn=1e6+10;

int n;
char S[maxn];

int main()
{
	file("snake");
	scanf("%s",S+1);
	n=strlen(S+1);
	static char Ans[110][110];
	for(rg int i=1;i<=100;i+=1)
		for(rg int j=1;j<=100;j+=1)
			Ans[i][j]='R';
	static pair<int,int>id[maxn];
	id[1]=make_pair(1,1);
	for(rg int i=2;i<=n;i+=1)
	{
		id[i]=id[i-1];
		if(id[i].first&1)
		{
			if(id[i].second<100)id[i].second+=1;
			else id[i].first+=1;
		}
		else
		{
			if(id[i].second>1)id[i].second-=1;
			else id[i].first+=1;
		}
	}
	for(rg int i=1;i<=n;i+=1)Ans[id[i].first][id[i].second]=S[i];
	printf("100 100\n");
	for(rg int i=1;i<=100;i+=1,puts(""))
		for(rg int j=1;j<=100;j+=1)
			putchar(Ans[i][j]);
	printf("1 1\n");
	for(rg int i=2;i<=n;i+=1)
	{
		auto [a,b]=id[i-1];
		auto [c,d]=id[i];
		if(a==c)
		{
			if(d==b+1)putchar('R');
			else putchar('L');
		}
		else
		{
			if(c==a+1)putchar('D');
			else putchar('U');
		}
	}puts("");
	return 0;
}
